package verb.Activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class gm_t_v_present_simple extends Activity{
	
	Integer menu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gm_t_v_present_simple);
        
        Bundle recogerDato = getIntent().getExtras();
        menu = recogerDato.getInt("menu");
    }
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
	    MenuInflater inflater = getMenuInflater();
	    inflater.inflate(R.menu.home, menu);
	    return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
	    switch (item.getItemId()) {
	    case R.id.menu_principal:
	    	
	    	if (menu==1){
	    		Intent intentMenu1 = new Intent(gm_t_v_present_simple.this,menu.class);
	    		intentMenu1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	    		startActivity(intentMenu1);
	    		finish();
	            return true;
	    	}
	    	if (menu==2){
	    		Intent intentMenu2 = new Intent(gm_t_v_present_simple.this,menu_2.class);
	    		intentMenu2.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	    		startActivity(intentMenu2);
	    		finish();
	            return true;
	    	}

	    case R.id.acerca_de:
			Intent intentAcer = new Intent(gm_t_v_present_simple.this,AcercaDe.class);
			startActivity(intentAcer);
	        return true;
	}
		return false;

	}
}